<template>
  <div class="item_wrapper">
    <div class="item_box" v-for="item in batch">
      <div class="flex_between border-bottom pd10">
        <span class="num">批次编号：{{item.uuid}}</span>
        <span class="num_date">{{item.create_date}}</span>
      </div>

        <div class="border-bottom flex_between fz14 pd10">
          <span class="">种植基地：<span class="color_main">{{item.base_name}}</span></span>
        </div>
        <div class="border-bottom flex_between fz14 pd10">
          <span class="">批次名称：<span class="color_main">{{item.name}}</span></span>
        </div>
        <div class="border-bottom flex_between fz14 pd10">
          <span>开始时间：<span class="color_main">{{item.start_time}}</span></span>
          <span>结束时间：<span class="color_main">{{item.end_time}}</span></span>
        </div>

      <div class="lk_detail">
        <slot name="center">
          <div class="detail-btn pd10" @click="toDetail(item)">查询详情
            <van-icon name="arrow"/>
          </div>
        </slot>

        <slot name="btns"></slot>
      </div>
    </div>
  </div>
</template>

<script>
    export default {
        name: "ItemView",
      props:{
          batch:{
            type: Array,
            default() {
              return []
            }
          }
      },

      methods: {
        toDetail(e) {
          console.log('点击跳转e',e);
          //this.$router.push('/operation')
          this.$router.push({path:'/operation', query:{pid:e.pid, bid:e.id, base_id:e.base_id}})
        }
      }
    }
</script>

<style scoped>
  .item_wrapper{
    padding-bottom: 1.5rem;
    /*height: 100vh;*/
  }
  .item_box{
    margin: 10px;
    background: #ffffff;
    border-radius: 8px;
  }
  .flex_between{
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  /*.flex2{*/
  /*  flex: 2;*/
  /*}*/
  /*.flex1{*/
  /*  flex: 1*/
  /*}*/
  .num{
    font-size: .32rem;
    color:#000000;
  }
  .num_date{
    font-size: .3rem;
  }
  .lk_detail{
    font-size: .32rem;
    text-align: center;
  }
  .detail-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-tint)
  }

</style>
